# -*- coding:utf-8 -*-
# @Time : 2020/1/7 16:32
# @Author: liangkun
# @File : user.py
# 定义在User类中的__table__、id和name是类的属性
from orm import Model
from django.forms.models import ModelChoiceField

from django.forms import Form

from django.forms import widgets

from django.forms import fields


# 类级别上定义的属性用来描述User对象和表的映射关系，而实例属性必须通过__init__()方法去初始化，所以两者互不干扰
class User(Model):
    # 生成类属性
    __table__ = 'users'
    id = fields.IntegerField(primary_key=True)
    name = fields.CharField()
